import java.util.StringTokenizer;
import java.util.Vector;


class P406_39643 {

static final int MAX = 2000;
	
	private static boolean[] primes = new boolean[MAX];
	private static int[] primos = new int[MAX];
	
	static String readLn() {
		String newLine = System.getProperty("line.separator");
		StringBuffer buffer = new StringBuffer();
		int car = -1;
		try {
			car = System.in.read();
			while ((car > 0) && (car != newLine.charAt(0))) {
				buffer.append((char) car);
				car = System.in.read();
			}
			if (car == newLine.charAt(0))
				System.in.skip(newLine.length() - 1);
		} catch (java.io.IOException e) {
			return (null);
		}
		if ((car < 0) && (buffer.length() == 0))
			return (null);
		return (buffer.toString()).trim();
	}

	static void createPrimes() {
		   int i, j;

		   for(i = 0; i < MAX; i++) {
		      primes[i] = false;
		   }

		   primes[1] = true;
		   primes[2] = true;
		   primes[3] = true;
		   primos[0] = 1;
		   primos[1] = 2;
		   primos[2] = 3;
		   
		   int counter = 3;

		   for(i = 5; i < MAX; i+=2) {
		       for(j = 3; j*j <=i ; j+=2)
		           if(i % j == 0) break;
		       if(i % j != 0 )  {
		    	   primes[i] = true;
		    	   primos[counter] = i;
		    	   counter++;
		       }
		   }
	
		   
//		   System.out.println(primos[counter-1]);
		   
		}
	
	public static void main(String[] args) {
		createPrimes();
		
		String line = readLn();
		
		while (line != null) {
			StringTokenizer st = new StringTokenizer(line);
			int n = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			process(n,c);
			
			line = readLn();
			
			System.out.println();
			
		}
		
	}
	
	private static void process(int n, int c) {
		
		int numberOfPrimes = 0;
		
		Vector numbers = new Vector();
		
		for (int k = 1; k <= n; k++) {
			if (primes[k]) {
				numberOfPrimes++;
				numbers.addElement(new Integer(k));
			}
		}
		
		if (numbers.size() % 2 == 0) {
			
			int y = numbers.size() - (c * 2);
			
			for (int k = 0; k < y / 2; k++) {
				numbers.removeElementAt(0);
				numbers.removeElementAt(numbers.size()-1);
			}
			
			print(n, c, numbers);
			
		} else {
			
			int y = numbers.size() - ((c * 2) - 1);
			
			for (int k = 0; k < y / 2; k++) {
				numbers.removeElementAt(0);
				numbers.removeElementAt(numbers.size()-1);
			}
			
			print(n, c, numbers);
		}
		
	}
	
	private static void print(int n, int c, Vector numbers) {
		
		StringBuffer sb = new StringBuffer(n + " " + c + ":");
		
		for (int k = 0; k < numbers.size(); k++) {
			sb.append(" " + numbers.elementAt(k));
		}
		
		System.out.println(sb.toString().trim());
		
	}
	
}
